import React, {Component} from 'react';
import {StyleSheet,TextInput} from 'react-native';
import {scaleSize} from '../../utils/screen';
import {fontFamily} from './FontText';

export default function(props){
    let {numberOfLines = 1,style = {},value = "",multiline = false,valuChange = ()=>null,placeholder = "",clearButtonMode  = 'while-editing',placeholderTextColor = "#909090", ...restProps} = props;
    return (<TextInput 
        placeholder = {placeholder}
        numberOfLines = {numberOfLines}
        onChangeText = {(val)=>valuChange(val)}
        style = {[styles.inputStyle,style]}
        value = {value}
        multiline = {multiline}
        underlineColorAndroid = {'transparent'}
        placeholderTextColor = {placeholderTextColor}
        clearButtonMode = {clearButtonMode}
        {...restProps}
    >
    </TextInput>)
}

const styles = StyleSheet.create({
    inputStyle:{
        fontSize: scaleSize(30),
        flex:1,
        color:"#464646",
        fontFamily:fontFamily.book
    }
})